//
//  recognizer.swift
//  foundationDemo
//
//  Created by Zhao Mingzhi on 16/6/24.
//  Copyright © 2016年 HNA. All rights reserved.
//

import UIKit
import Foundation

class recognizerController:UIViewController{
    
    @IBOutlet weak var view1: UIView!
    @IBOutlet var tap1: UITapGestureRecognizer!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.multipleTouchEnabled=false
        self.view.userInteractionEnabled=true
        
//        let TapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(recognizerController.doPost(_:)))
//        TapGestureRecognizer.numberOfTapsRequired = 1
//        TapGestureRecognizer.numberOfTouchesRequired = 1
//        
//        self.view1.addGestureRecognizer(TapGestureRecognizer)
    }
    
//    @objc func doPost(gesture:UIGestureRecognizer){
//        
////       print(view1.backgroundColor)
//    }
    
    @IBAction func tap1DidTapped(sender: AnyObject) {
        self.view1.backgroundColor=UIColor.brownColor()
    }
    
}
